<div id="main_content">
	<h3><?php echo $this->lang->line('ppl__Title'); ?></h3>
    <a href="<?php echo base_url();?>pit-parameter/add" class="new_regis"><?php echo $this->lang->line('MC007'); ?></a>    
    <div class="table_list">
		
    	<table width="100%" border="0"  class="list_view_data" cellpadding="0" cellspacing="0">
            <tr align="center">
                <th width="15%"><?php echo $this->lang->line('ppl__No'); ?></th>
                <th width="20%"><?php echo $this->lang->line('ppl__Employeedeductionamount'); ?></th>
                <th width="20%"><?php echo $this->lang->line('ppl__Deductionpersondependant'); ?></th>
                <th width="15%"><?php echo $this->lang->line('ppl__Applydate'); ?></th>
                <th width="15%"><?php echo $this->lang->line('ppl__Action'); ?></th>
                <th width="15%"><?php echo $this->lang->line('spl__Delete'); ?></th>
            </tr>
            <?php $count = $page + 1; foreach($data as $row){
                $path=($row['Del_Flag']==0) ? base_url()."public/sites/images/check-icon.png" : base_url()."public/sites/images/uncheck.gif";
                ?>
            <tr>
            	<td align="center"><?php echo $count++; ?></td>
                <td align="right"><a class="h_td_name edit"  rel="<?php echo $row['ParameterId'] ?>" href="javascript:void(0);"><?php echo number_format($row['EmployeeDeductionAmount'],2, '.', ',') ?></a></td>
                <td align="right"><?php echo number_format($row['DeductionPerDependant'],2, '.', ',') ?></td>
                <td align="right"><?php echo date('Y/m',strtotime($row['ApplyDate'])); ?></td>
                <td align="center"><a class="h_td_name list" rel="<?php echo $row['ParameterId'] ?>" href="javascript:void(0);"><?php echo $this->lang->line('ppl__PITRules'); ?></a></td>
                <td align="center"><img src="<?php echo $path;?>"/></td>
            </tr>
            <?php } ?>
                                               
        </table>
        <label for='disabledSelect' > <?php echo $messsageError; ?></label>
    </div>
    
    <div class="h_pagination">
        <?php echo $pagination;  ?>
    </div>
</div>

<form id="frmCompanyCode" action="<?php echo base_url();?>pit-rules" Method="POST">
  <input type="hidden" id="hidParameterID" name="hidParameterID">  
</form>

<script>
$( ".edit" ).click(function() {        
     $('#hidParameterID').val($(this).attr('rel'));    
     $('#frmCompanyCode').attr('action', '/pit-parameter/edit');  
     $( "#frmCompanyCode" ).submit();
});

$( ".list" ).click(function() {        
     $('#hidParameterID').val($(this).attr('rel'));  
     $('#frmCompanyCode').attr('action', '<?php echo base_url();?>pit-rules');  
     $( "#frmCompanyCode" ).submit();
});     
</script>